<!-- This page retrieves tags depending upon a particular Question and includes
	 the output at calling page. -->

<%@page import="com.metagurukul.informer.service.TagSearchService,com.metagurukul.informer.valueObjects.Tags,java.util.*"%>
<%

   String id=null;

   if(request.getParameter("question_id") == null || request.getParameter("question_id").equals("-1")) {
	   id=(String)request.getAttribute("question_id");
   } else {
	   id=request.getParameter("question_id");
   }
   
   int question_id=Integer.parseInt(id);
   TagSearchService tagSearchService=new TagSearchService();
   
   /*
   *	calling the searchTags method to get the names of all the tags.
   */
   List<Tags> tags=tagSearchService.searchTags(question_id);
   for(Tags tag:tags){
	   %>
		<a href="TagSearch?id=<%=tag.getId()%>&name= <%=tag.getName()%> " class="post-tag" title="" rel="tag"> <%=tag.getName()%> </a>	   
	   <%
   }
%>


